unit CfopSearchFr;

{$mode objfpc}{$H+}

interface

uses
  Classes, SysUtils, FileUtil, LResources, Forms, Controls, Graphics, Dialogs,
  ExtCtrls, Buttons, StdCtrls, MainSearchFr;

type

  { TCfopSearchFrame }

  TCfopSearchFrame = class(TMainSearchFrame)
    code: TEdit;
    desc_cfop: TEdit;
    Label1: TLabel;
    Label2: TLabel;
    procedure LocalizarButtonClick(Sender: TObject);
  private
    { private declarations }
  public
    { public declarations }
  end;

implementation

uses CfopDM,QueryConditions;

{ TCfopSearchFrame }

procedure TCfopSearchFrame.LocalizarButtonClick(Sender: TObject);
  var
  condicoes: TQueryConditions;
begin
  condicoes := TQueryConditions.Create(CON_AND);
  condicoes.Add('code', code.Text);
  condicoes.AddText('desc_cfop', desc_cfop.Text);
  CfopData.Search(Condicoes, 'cfop');
end;

initialization
  {$I cfopsearchfr.lrs}

end.

